// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently

#pragma once

#ifndef STRICT
#define STRICT
#endif

#include "targetver.h"

#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS	// some CString constructors will be explicit

#include <comsvcs.h>

#include "resource.h"
#include <atlbase.h>
#include <atlcom.h>
#include <atlctl.h>
#include <windows.h>

using namespace ATL;

#define FOURCC_WVC1     mmioFOURCC('W','V','C','1')
#define FOURCC_wvc1     mmioFOURCC('w','v','c','1')
#define FOURCC_I420     mmioFOURCC('I','4','2','0') 
#define FOURCC_IYUV     mmioFOURCC('I','Y','U','V')
// Nick
#define FOURCC_YV12     mmioFOURCC('Y','V','1','2') 
#define FOURCC_yv12     mmioFOURCC('y','v','1','2') 
#define FOURCC_iyuv     mmioFOURCC('i','y','u','v')
#define FOURCC_i420     mmioFOURCC('i','4','2','0')
#define FOURCC_wmv3     mmioFOURCC('w','m','v','3')
#define FOURCC_WMV3     mmioFOURCC('W','M','V','3')
#define FOURCC_DIB      mmioFOURCC('D','I','B',' ')

#define DEFINE_GUIDA(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
        const GUID name \
                = { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }
DEFINE_GUIDA(MEDIASUBTYPE_WVC1, FOURCC_WVC1, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);

DEFINE_GUID(MEDIASUBTYPE_wvc1,
FOURCC_wvc1, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);

#ifndef SAFE_DELETE
#define SAFE_DELETE(x) if (x) { delete x; x = NULL;}
#endif

#ifndef SAFE_ARRAY_DELETE
#define SAFE_ARRAY_DELETE(x) if (x) { delete [] x; x = NULL;}
#endif

#ifndef SAFE_RELEASE
#define SAFE_RELEASE(x) if (x) { x->Release(); x = NULL;}
#endif

#ifndef SAFE_CLOSE_FILEHANDLE
#define SAFE_CLOSE_FILEHANDLE(x) if (x) { CloseHandle(x); x = NULL;}
#endif

#ifndef UNICODE
#define UNICODE
#endif
